from instance import instance
from graph import graph
import networkx as nx
from sklearn.cluster import KMeans
from connect import egress,ingress

def main():
  g = graph("../group0.edgelist")
  g.nG = g.G

  sp,index = g.indexEMBFile("../group0.emb")
  sp.toReal()
  random_state = 170
  clusters = 10
  c_y = KMeans(n_clusters=clusters, random_state=random_state).fit_predict(sp.pos)
  print(c_y)
  sp.down(2)
  sp.plot(c_y)
if __name__ == '__main__':
  main()